package com.bjpowernode.service.impl;

import com.bjpowernode.entity.Income;
import com.bjpowernode.mapper.IncomeMapper;
import com.bjpowernode.service.IncomeService;

import java.util.List;

public class IncomeServiceImpl implements IncomeService {

    /**
     * 访问收入数据
     */
    private IncomeMapper incomeMapper;

    @Override
    public void insertIncome(Income income) {
        this.incomeMapper.insertIncome(income);
    }

    @Override
    public List<Income> selectAllIncomes() {
        return this.incomeMapper.selectAllIncomes();
    }

    @Override
    public void deleteIncomeById(Integer id) {
        this.incomeMapper.deleteIncomeById(id);
    }

    @Override
    public void updateIncomeById(Income income) {
        this.incomeMapper.updateIncomeById(income);
    }

    @Override
    public Income selectIncomeById(Integer id) {
        return this.incomeMapper.selectIncomeById(id);
    }

    public IncomeMapper getIncomeMapper() {
        return incomeMapper;
    }

    public void setIncomeMapper(IncomeMapper incomeMapper) {
        this.incomeMapper = incomeMapper;
    }
}
